package com.ip.controller.auth;

import com.ip.pojo.common.ResponseEntity;
import com.ip.pojo.enums.ResponseCodeEnum;
import com.ip.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/oss")
public class OssController {
    @Autowired
    private OssService ossService;

    @PostMapping("/upload")
    public ResponseEntity<String> upload(@RequestParam("file") MultipartFile file) {
        if (file == null) {
            return ResponseEntity.failed(ResponseCodeEnum.PARAM_ERROR);
        }
        return ResponseEntity.success("");
    }
}
